package com.centronix.dao;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import com.centronix.domain.Product;
@Repository
public interface ProductDAO extends JpaSpecificationExecutor<Product>, JpaRepository<Product, Integer>{
	
	@Query(" select p from Product p where p.productType.typeId = :productType")
	public List<Product> findProductByProductType(@Param("productType") int productType);
	
}
